package com.xhs.controller;

import com.xhs.dto.request.ZipFileRequest;
import com.xhs.message.ReturnResult;
import com.xhs.service.ZipFileService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @desc: 压缩文件
 * @projectName: tools-parent
 * @author: xhs
 * @date: 2023/3/14 23:01
 * @version: JDK 1.8
 */
@Slf4j
@RestController
@RequestMapping("/zip")
public class ZipFileController {
    @Autowired
    private ZipFileService zipFileService;

    /**
     * 压缩文件
     *
     * @param request
     * @return ReturnResult<Object>
     */
    @PostMapping("/zipFile")
    public ReturnResult<Object> zipFile(@RequestBody ZipFileRequest request) {
        return zipFileService.zipFile(request);
    }
}
